package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.RideOrderOrderPlatform;
import com.njtoyo.taxi.admin.mapper.master.enums.RideOrderPaidThrough;
import com.njtoyo.taxi.admin.mapper.master.enums.RideOrderState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-07-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "RideOrder对象", description = "")
public class RideOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String number;

    private String outTradeNumber;

    private Long rideId;

    private Long userId;

    private Long couponId;

    private BigDecimal amount;

    @ApiModelProperty(value = "实际所得")
    private BigDecimal actualAmount;

    private BigDecimal prepayAmount;

    private BigDecimal farePaid;
    private BigDecimal infoServiceAmount;

    @ApiModelProperty(value = "活动实际补贴金额（如果优惠券、余额抵扣之后金额为0，记录0；如果抵扣之后金额为0.8,当前补贴为1，记录0.8")
    private BigDecimal allowanceAmount;

    @ApiModelProperty(value = "乘客补贴流水表的ID")
    private Long allowanceRefId;

    @ApiModelProperty(value = "0:unknown,1:cash,2:online,3:wxapp,4:wechat,5:alipay,6:saving,7:redpacket,8:jybwxapp,9:point,10:mixed,11:unionpay")
    private RideOrderPaidThrough paidThrough;

    @ApiModelProperty(value = "0:unknown,1:cash,2:online,3:wxapp,4:wechat,5:alipay,6:saving,7:redpacket,8:jybwxapp,9:point,10:mixed,11:unionpay")
    private RideOrderPaidThrough presetThrough;

    @ApiModelProperty(value = "0:init,1:operated,2:done,3:cancelled,4:failed,5:rejected,6:front_end_done")
    private RideOrderState state;

    @ApiModelProperty(value = "加价")
    private Integer priceMarkup;

    @ApiModelProperty(value = "订单来源渠道：0:wxmina[微信小程序] 1:app[APP] 2:h5[h5网页] 3:webkit[全澄通] 4:h5Market[h5本地生活]")
    private RideOrderOrderPlatform orderPlatform;

    private Boolean refunded;

    private Date createdAt;

    private Date updatedAt;

    @ApiModelProperty(value = "支付时间")
    private Date lastPayTime;

    private BigDecimal balancePaid;

    private BigDecimal totalPaid;

    private Boolean hasOnline;

    private BigDecimal driverEarnAmount;

    private BigDecimal refundAmount;
    private BigDecimal payAmount;
    private BigDecimal driverRefundAmount;
    /**
     * false 为已改价
     */
    private Boolean showFeeDetail;

}
